package servlets;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;

public class SomeServlet extends GenericServlet{
    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("执行SomeServlet的service()方法");

        String param = this.getInitParameter("company");

        System.out.println("param = "+param);
        String servletName = this.getServletName();

        System.out.println(servletName);
    }


    //重写父类的无参init()方法
    @Override
    public void init() {

        System.out.println("=================================");
    }
}
